package com.example.dreamlist2;

import android.app.Application;

import com.baidu.mapapi.CoordType;
import com.baidu.mapapi.SDKInitializer;
import com.example.dreamlist2.goal.HabitCompleteItem;
import com.example.dreamlist2.goal.HabitItem;

import cn.bmob.v3.BmobObject;

//全局变量
//记录登录状态和登录的用户
public class StateInfo extends Application {
    private boolean login;
    private User userin;
    private HabitItem habitin;
    private HabitCompleteItem recordin;

    //初始化，未登录，无用户
    @Override
    public void onCreate(){
        login = false;
        userin = null;
        habitin = null;
        recordin = null;
        super.onCreate();

        //在使用SDK各组件之前初始化context信息，传入ApplicationContext
        SDKInitializer.initialize(this);
        //自4.3.0起，百度地图SDK所有接口均支持百度坐标和国测局坐标，用此方法设置您使用的坐标类型.
        //包括BD09LL和GCJ02两种坐标，默认是BD09LL坐标。
        SDKInitializer.setCoordType(CoordType.BD09LL);


    }

    public void setLogin(boolean log) {
        login = log;
    }

    public boolean getLogin() {
        return login;
    }

    public void setUserin(User userin1){
        userin=userin1;
    }

    public void setHabitin(HabitItem habitin1){
        habitin=habitin1;
    }

    public User getUserin() {
        return userin;
    }

    public HabitItem getHabitin() {
        return habitin;
    }

    public HabitCompleteItem getRecordin() {
        return recordin;
    }

    public void setRecordin(HabitCompleteItem habitCompleteItem1) {
        recordin=habitCompleteItem1;
    }
}

